//
//  VideoTableViewCell.m
//  TourPlay
//
//  Created by dllo on 15/12/1.
//  Copyright © 2015年 王军岐. All rights reserved.
//

#import "VideoTableViewCell.h"

@interface VideoTableViewCell ()

@property (nonatomic, retain) UIImageView *imageV;
@property (nonatomic, retain) UILabel *timeL;
@property (nonatomic, retain) UILabel *titleL;

@end

@implementation VideoTableViewCell
- (void)dealloc
{
    [_videoMod release];
    [_imageV release];
    [_timeL release];
    [_titleL release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}
- (void)createSubViews
{
    self.imageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT * (1 / 3.f))];
    self.imageV.backgroundColor = [UIColor brownColor];
    [self.contentView addSubview:self.imageV];
    [_imageV release];
    
    self.titleL = [[UILabel alloc] initWithFrame:CGRectMake(0, (self.imageV.frame.size.height - 40) / 2.f, SCREEN_WIDTH, 40)];
    self.titleL.text = @"这是标题";
    self.titleL.textAlignment = NSTextAlignmentCenter;
    self.titleL.textColor = [UIColor whiteColor];
    self.titleL.font = [UIFont fontWithName:@"FZLTZCHJW--GB1-0" size:18.f];
    self.titleL.backgroundColor = [UIColor orangeColor];
    [self.contentView addSubview:self.titleL];
    [_titleL release];
    
    self.timeL = [[UILabel alloc] initWithFrame:CGRectMake(0, (self.imageV.frame.size.height - 40) / 2.f + self.titleL.frame.size.height + 5, SCREEN_WIDTH, 40)];
    self.timeL.text = @"显示时间";
    self.timeL.textColor = [UIColor whiteColor];
    self.timeL.font = [UIFont fontWithName:@"Heiti TC" size:13.5f];
    self.timeL.backgroundColor = [UIColor orangeColor];
    self.timeL.textAlignment = NSTextAlignmentCenter;
    self.timeL.backgroundColor = [UIColor orangeColor];
    [self.contentView addSubview:self.timeL];
    [_timeL release];
}
- (void)setVideoMod:(VideoModel *)videoMod
{
    if (_videoMod != videoMod) {
        [_videoMod release];
        _videoMod = [videoMod retain];
    }
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
